<?php 
if(!$session->check('Auth.User.id')){

	echo $this->Html->css(array(HOST.'/dictionary',HOST.'/form',HOST.'/actions'),null,array('inline'=>false));
	echo $this->Html->script(array('highslide-full'),$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));		
	echo $javascript->codeBlock("
		hs.graphicsDir = '/css/highslide/graphics/';
		hs.outlineType = 'rounded-white';
		hs.wrapperClassName = 'draggable-header';
		hs.align = 'center';
	",$options = array('allowCache'=>false,'safe'=>false,'inline'=>false));
}
?>
<body>
<?php echo $this->Section->main(); ?>
<div class="container_4">	
	
	<div class="nav">
		<div class="grid_1">
			<div class="logo"><?php echo $this->Html->link($this->Html->image(HOST.'/logo.png'),'/',array('escape'=>false));?></div>
		</div>	
		<div class="grid_3">
			<?php echo $this->element('menu-top')?>
		</div>
	</div>
	
	<div class="clear"> </div>
	
	<div class="grid_4  content_header">
		<div class="grid_1">
			<?php echo $this->element('menu-right-gallery',array('plugin' => false,'categories'=>$this->Gallery->categories()))?>
		</div>	
		<div class="grid_3">

    	<?php
    		//pobranie indeksu kategorii 
    		$category = (isset($this->params['named']['g'])) ? $this->params['named']['g'] : null;    		
    		$aCategory = $this->Gallery->category($category);
    	?>
    	
    	<h2><?php echo $aCategory['GalleryCategory']['name']?></h2>
		<?php 
		
		
		echo $this->element('gallery',array('plugin' => false,
		'items'=>$this->Gallery->index($aCategory['GalleryCategory']['id'])
		,'category_id'=>$aCategory['GalleryCategory']['id']
		,'params'=>array('width'=>125,'height'=>100,'padding'=>5,'margin'=>5,'border'=>0,'i'=>null)
		));?>


		</div>
	</div>
	<div class="clear"> </div>

	<?php echo $this->element('footer');?>
	<div class="clear"> </div>
</div>
<div class="clear"> </div>
</body>
